Repository navigation
Update korthout/backport-action action to v5 - #249
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
v4.7.1→v5.0.0Release Notes
korthout/backport-action
v5.0.0: Backport-action v5.0.0Compare Source
🎂 Six years of backport-action
Six years ago today, on November 11, 2020, the first commit of backport-action landed. What started as a small script to save us from cherry-picking by hand has grown into an action trusted by projects of all sizes. Among the public repositories using it, 137 have over 100 stars, 67 have over 1,000, 18 have over 10,000, and 4 have over 100,000. We've had 48 releases, with contributions from 24 people. And we've collected 125 stars ourselves.
Thank you to everyone who contributed code, reported an issue, shared an idea, or simply trusted this action with your backports. A new major release is a fitting way to mark the occasion. Here's to the next six years!
Breaking changes
v5 is all about improving placeholders: the
${...}values the action fills into thepull_title,pull_descriptionandbranch_nametemplates. The default templates use them too. Most workflows won't notice a difference. If you've customizedpull_title,pull_descriptionorbranch_name, check the notes below.All placeholders
Every occurrence of a placeholder is replaced
A placeholder that occurs more than once in a template is now replaced everywhere. A template like
${pull_number} ... ${pull_number}now results in123 ... 123, as you'd expect. Previously it resulted in123 ... ${pull_number}.The same fix also changes two less common cases:
${target_branch}, it now appears literally instead of being replaced.$in the original pull request's title or description is kept as written. Previously sequences like$$,$&,$`and$'were rewritten, soecho $$ > app.pidbecameecho $ > app.pid. If you worked around this, for example by doubling$$into$$$$, remove the workaround.Fixes #435 and #694.
Specific placeholders
${issue_refs}lists the references a description refers to, once and as written, ignoring comments, code, and link text${issue_refs}now reads the original pull request's description as Markdown and lists the issues and pull requests it refers to: each one once, as written there. It now ignores references in code, comments, and link text. In v4 it matched patterns in the raw text, so it missed many references and picked up some that weren't references at all.Take this description:
With
pull_description: "Relates to ${issue_refs}", v4 givesRelates to #​706 #​755. v5 givesRelates to Korthout/Backport-Action#752 #​753 korthout/backport-action#749 actions/checkout#1.(#​123)orFixes #​123.; references separated by a single space;GH-123; pull request URLs, also when followed by punctuation, a query or a fragment; and links to an issue or pull request, like[the bug](https://redirect.github.com/owner/repo/issues/123).<!-- ... -->), such as the instructions in a pull request template; in code (fenced, indented or inline); in HTML attributes or inside<code>,<pre>and<a href>; and in a link's text.#​1234 #​1234 #​1234. Now each issue is listed once, in the order it first appears and in its first spelling. An issue written both as#123and in full is listed in full, so it keeps referring to the original repository.A URL is still listed as
owner/repo#123, and${pull_description}still contains the full description, comments included. No configuration needed.Thanks to @remcowesterhoud, who started this work by making
${issue_refs}ignore comments and repeated references. Fixes #706, #752, #753, #755 and #756.What's Changed
The README now describes v5: its examples use
korthout/backport-action@v5, and the notice that v5 wasn't released yet is gone.Updated dependencies
46f4caeby @renovate[bot] in #794Maintenance changes
Full Changelog: korthout/backport-action@v4.7.2...v5.0.0
v4.7.2: Backport-action v4.7.2Compare Source
What's Changed
Thanks to two contributions by @bahimehdi, this release fixes two bugs. Neither needs any configuration.
With
comment_style: legacy, the action posts an explanatory comment when the original pull request isn't merged, or when it contains merge commits withmerge_commits: fail. Previously, if GitHub rejected that comment, the job could crash. Now the action logs the failure and doesn't fail the job, as it already did for the summary comment.With
merge_commits: skip, a pull request that contains only merge commits was reported as a failed backport for every target branch, with instructions to cherry-pick no commits. Withexperimental.conflict_resolution: draft_commit_conflicts, the action instead pushed an unchanged backport branch for each target branch. Now the action explains once, on the original pull request, that there is nothing to backport and why, and doesn't touch any target branch. It setswas_successfultotrue, as it does when every target branch already contains the changes. Withcomment_style: summary, that looks like this:The summary comment also no longer says "backported this pull request" when every target branch was skipped, for example because its backport pull request already exists. It now says "found nothing left to backport from this pull request".
The README now explains how to run CI on your backport pull requests right away. With the default
GITHUB_TOKEN, CI doesn't run on backport pull requests, or its runs wait for approval. The new Run CI on backport pull requests section shows how to give the action a GitHub App token instead, and pass it to bothactions/checkoutand the action. The README also explains what public repositories need to do before GitHub blockspull_request_targeton December 2, 2026: allow the event for the backport workflow in an Actions policy (andissue_commenttoo, if you trigger backports with a comment).New Contributors
Maintenance changes
Full Changelog: korthout/backport-action@v4.7.1...v4.7.2
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.